<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Cache extends CI_Controller {


	function index()
	{
		$this->load->driver('cache');

		if ( ! $foo = $this->cache->file->get('foo'))
		{
			 echo 'Saving to the cache!<br />';
			 $foo = 'foobarbaz!';

			 // Save into the cache for 5 minutes
			 $this->cache->file->save('foo', $foo, 300);
		}

		echo $foo; 


	}

	
}

/* End of file cache.php */
/* Location: ./application/controllers/cache.php */